<%@ page import="com.hc.commodity.pojo.Commodity" %>
<%@ page import="java.util.List" %>
<%--
       删除购物车中的某个商品
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/4/7
  Time: 20:04
  To change this template use File | Settings | File Templates.
--%>
<%
    int index = Integer.parseInt(request.getParameter("index"));
    List<Commodity> shoppingTrolleyList = (List<Commodity>) session.getAttribute("shoppingTrolley");
    shoppingTrolleyList.remove(index);
    session.setAttribute("shoppingTrolley",shoppingTrolleyList);
    response.sendRedirect("ShoppingTrolley.jsp");
%>
